import { createI18n } from 'vue-i18n';
import en from './lang/en-US';
import zh from './lang/zh-CN';

const i18n = createI18n({
  legacy: false,
  locale: localStorage.getItem('lang') || 'zh-CN',
  globalInjection: true,
  messages: {
    'zh-CN': zh,
    'en-US': en
  }
});

export default i18n;